import React from 'react';
import { Redirect, useLocation } from 'umi';

export default function Film(props: any) {
  const location = useLocation();

  if(location.pathname == "/film" || location.pathname == "/film/") {
    return <Redirect to="/film/nowplaying"></Redirect>
  }

  return (
    <div>
      <div style={{ height: '200px', background: 'yellow' }}>大轮播</div>
      {props.children}
    </div>
  );
}
